// Work Order表单中添加查看质量报表按钮
frappe.ui.form.on('Work Order', {
    refresh: function(frm) {
        if (frm.doc.docstatus === 1) {
            frm.add_custom_button(__('查看质量报表'), function() {
                frappe.set_route('query-report', 'MES Quality Inspection Data Report', {
                    work_order: frm.doc.name
                });
            }, __('质量'));
        }
    }
});
